﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Themes/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<UserForm>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
用户注册
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="CssContent" runat="server">
    <link type="text/css" rel="Stylesheet" href="/Style/Store.css" />
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <div class="webNav">
        当前位置：<%=Html.ActionLink("首页","index","home") %>
        > 用户注册
    </div>
    <div class="storelogin">
        <h1>用户注册</h1>
        <%using (Html.BeginForm()){ %>
        <table style="margin-top:20px;">
            <tr>
                <td class="tdlable"><%=Html.LabelFor(m=>m.LoginID) %></td>
                <td>
                    <%=Html.TextBoxFor(m => m.LoginID)%>
                    <%=Html.ValidationMessageFor(m => m.LoginID)%>
                </td>
            </tr>
            <tr>
                <td class="tdlable"><%=Html.LabelFor(m => m.PassWord)%></td>
                <td>
                    <%=Html.PasswordFor(m => m.PassWord)%>
                    <%=Html.ValidationMessageFor(m => m.PassWord)%>
                </td>
            </tr>
            <tr>
                <td class="tdlable"><%=Html.LabelFor(m => m.RePassWord)%></td>
                <td>
                    <%=Html.PasswordFor(m => m.RePassWord)%>
                    <%=Html.ValidationMessageFor(m => m.RePassWord)%>
                </td>
            </tr>
            <tr>
                <td class="tdlable"><%=Html.LabelFor(m => m.Email)%></td>
                <td>
                    <%=Html.TextBoxFor(m => m.Email)%>
                    <%=Html.ValidationMessageFor(m => m.Email)%>
                </td>
            </tr>

            <tr>
                <td class="tdlable"><%=Html.LabelFor(m => m.Mobile)%></td>
                <td>
                    <%=Html.TextBoxFor(m => m.Mobile)%>
                    <%=Html.ValidationMessageFor(m => m.Mobile)%>
                </td>
            </tr>

            <tr>
                <td class="tdlable"><%=Html.LabelFor(m => m.UserType)%></td>
                <td><%=Html.DropDownListFor(m => m.UserType, new List<SelectListItem>() { 
                        new SelectListItem() { Text = "厂商", Value = LuKou.Member.EUserType.Vendor.ToString() }, 
                        new SelectListItem() { Text = "代理商", Value = LuKou.Member.EUserType.Agents.ToString() }, 
                        new SelectListItem() { Text = "摄影店", Value = LuKou.Member.EUserType.Photography.ToString() } , 
                        new SelectListItem() { Text = "代发", Value = LuKou.Member.EUserType.Shipped.ToString() }
                    }, new { id = "UserType" })%>
                     <%=Html.ValidationMessageFor(m => m.UserType)%>
                </td>
            </tr>
        </table>

        <table id="extInfo" style="display:none;">
            <tr>
                <td class="tdlable"><%=Html.LabelFor(m => m.UserSex)%></td>
                <td><%=Html.DropDownListFor(m => m.UserSex, new List<SelectListItem>() { 
                        new SelectListItem() { Text = "保密", Value = LuKou.Member.EUserSex.Secrecy.ToString() }, 
                        new SelectListItem() { Text = "男", Value = LuKou.Member.EUserSex.Men.ToString() }, 
                        new SelectListItem() { Text = "女", Value = LuKou.Member.EUserSex.Women.ToString() } 
                    })%>
                    <%=Html.ValidationMessageFor(m => m.UserSex)%>
                </td>
            </tr>
            <tr>
                <td class="tdlable"><%=Html.LabelFor(m => m.ShopURL)%></td>
                <td>
                    <%=Html.TextBoxFor(m => m.ShopURL)%>
                    <%=Html.ValidationMessageFor(m => m.ShopURL)%>
                </td>
            </tr>
            <tr>
                <td class="tdlable"><%=Html.LabelFor(m => m.QQ)%></td>
                <td><%=Html.TextBoxFor(m => m.QQ)%></td>
            </tr>
            <tr>
                <td class="tdlable"><%=Html.LabelFor(m => m.MSN)%></td>
                <td>
                    <%=Html.TextBoxFor(m => m.MSN)%>
                </td>
            </tr>
            <tr>
                <td class="tdlable"><%=Html.LabelFor(m => m.WangWang)%></td>
                <td>
                    <%=Html.TextBoxFor(m => m.WangWang)%>
                    <%=Html.ValidationMessageFor(m => m.WangWang)%>
                </td>
            </tr>
        </table>
        <table>
            <tr>
                <td class="tdlable"><%=Html.LabelFor(m => m.ValidateCode)%></td>
                <td>
                    <%=Html.TextBoxFor(m => m.ValidateCode, new  { style="width:70px"})%>
                    <img style="cursor: pointer;" src="/ValidateCode.aspx/VerifyImage" id="VerifyImage"
                        title="看不清？点击换一个" align="absmiddle" onclick="javascript:document.getElementById('VerifyImage').src='/ValidateCode.aspx/VerifyImage/'+Math.random();return false;" />
                    <%=Html.ValidationMessageFor(m => m.ValidateCode)%>
                </td>
            </tr>
            <tr>
                <td class="tdlable"></td>
                <td>
                   <%=Html.CheckBox("chkAgreen", false, new { style = "width:16px;height:16px;margin:0;padding:0;" })%>
                   我已经阅读并同意<%=Html.ActionLink("用户服务协议", "", "", new { @class="a adecoration", style = "margin:0 0 0 6px" })%>
                </td>
            </tr>
            <tr>
                <td class="tdlable"></td>
                <td><%=Html.ValidationMessage("RegError")%></td>
            </tr>
            <tr>
                <td class="tdlable"></td>
                <td>
                    <input class="btnlogin" type="image" src="/Style/Images/store_reg.png" />
                </td>
            </tr>
        </table>
        <%}%>
    </div>
    <div class="storeloginintro">
        <p class="tips">友情提示：如果您还不是会员，请注册。</p>
        <p class="notes">注册之后，你可以：</p>
        <ol>
            <li>保存您的个人资料</li>
            <li>收藏您关注的商品</li>
            <li>订阅本店的商品信息</li>
        </ol>
        <p class="tips">已经拥有路口帐号。</p>
        <p class="link" style="margin-top: 10px;"><%=Html.ActionLink("立即登录", "Login", "Account")%></p>
    </div>
</asp:Content>


<asp:Content ID="Content3" ContentPlaceHolderID="JsContent" runat="server">
<script type="text/javascript">
    jQuery(function () {
        $("#UserType").change(function () {
            var vid = $(this).val();
            if (vid == '<%=LuKou.Member.EUserType.Agents.ToString()%>' || vid == '<%=LuKou.Member.EUserType.Shipped.ToString()%>') {
                $("#extInfo").show();
            } else {
                $("#extInfo").hide();
            }
        }).change();
    });
</script>
</asp:Content>
